package com.leap.entity.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Builder
@Schema(description = "主评论展示类")
public class CommentChildVO {

    @Schema(description = "主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "评论的用户头像")
    private String avatar;

    @Schema(description = "评论的用户名字")
    private String nickname;

    @Schema(description = "评论内容")
    private String content;

    @Schema(description = "点赞数")
    private int likeCount;

    @Schema(description = "当前用户是否已点赞")
    private int isLiked;

    @Schema(description = "评论发表时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;
}
